const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
    transpileDependencies: true
})

const path = require('path') // 地址
module.exports = {
    devServer: {
        port: 8083,
        open: false,
        // 配置代理
        proxy: {
            '/api': {
                target: 'http://127.0.0.1:8084',
                //target: 'http://192.168.3.51:8084/',
                changeOrigin: true,
                pathRewrite: {
                    '^/api': ''
                }
            }
        }
    },
    lintOnSave: false,
    chainWebpack: (config) => {
        config.resolve.alias
            .set('@', path.join(__dirname, 'src'))
            .set('components', path.join(__dirname, 'src/components'))
            .set('views', path.join(__dirname, 'src/views'))
            .set('api', path.join(__dirname, 'src/api'))
            .set('utils', path.join(__dirname, 'src/utils'))
            .set('plugins', path.join(__dirname, 'src/plugins'))
            .set('assets', path.join(__dirname, 'src/assets'))
    }
}